User Activity API: userActivity

The User Activity API provides insights into a customer's online activity within the Real-time CDP. This API retrieves detailed information regarding different event types, such as transactions, along with the corresponding dates and times of these activities. Additionally, it provides data on products that capture the customer's interest. This functionality helps businesses effectively track customer engagement and interactions, facilitating an enhanced understanding of user behavior and preferences.

API Endpoint and Method

URL Format

Copy
https://{B2B_API_URL}/api/v1/profile/b2b/userActivity

Example URL

Copy
https://api-dev.algonomy.com/rcdpapi/api/v1/profile/b2b/userActivity

HTTP Method

POST

Request Header Parameters

Parameter

Type Required or Optional

Description

access_token

String

Required

Specifies the access token obtained from the create access token API.
tenant_hash

String

Required

Specifies the tenant hash shared with the tenant.
gcrId String Required Specifies the Golden Customer Record ID (GCR ID).
mobile_number String Required

Specifies customer's mobile number.

Example: "1212121212"

email_address String Required

Specifies customer's email address.

Example: "customer@example.com"

customer_code_external

String

Required

Specifies the external customer code.

Example: "123456"

    Notes:
  • You can send all the parameters (gcrId, mobile_number, and email_address) with the request or just one, as at least one parameter is required.

  • These parameters are supported based on the configuration. If your deployment is configured to use them as columns for deduplication, they will be available for use in the API call.

Request Body

None

Response Body

A successful request returns a "200-OK" status code, accompanied by the retrieved data in the response.

Copy
{
  "status": "OK",
  "message": "",
  "data": {
    "activity": [
      {
        "date": "10-05-2020",
        "activityList": [
          {
            "id": "transaction_complete",
            "displayName": "Transaction complete",
            "displayDesc": "Transaction complete event from any of the sources.",
            "iconPath": "transaction-complete.svg",
            "timestamp": "10-05-2020 10:10:12"
          }
        ]
      },
      {
        "date": "09-05-2020",
        "activityList": [
          {
            "id": "transaction_complete",
            "displayName": "Transaction complete",
            "displayDesc": "Transaction complete event from any of the sources.",
            "iconPath": "transaction-complete.svg",
            "timestamp": "09-05-2020 10:10:12"
          }
        ]
      }
    ],
    "interestedProduct": [
      {
        "productCode": "",
        "productName": "",
        "productDescription": "",
        "productImgUrl": "",
        "retailPrice": 10.0,
        "currencySymbol": "$"
      }
    ],
    "interestedProductCategory": [
      "Fashion",
      "Watch"
    ]
  }
}